﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<OptimumInfra.Models.SupportService>" %>


<asp:Content ID="registerContent" ContentPlaceHolderID="AdminContent" runat="server">
    <h2>Create new service support</h2>

    <% using (Html.BeginForm("Create", "ServiceSupport", FormMethod.Post, new { id="serviceCreate", name="serviceCreate" }))
       { %>
        <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")%>
                <span>Service Information <br /></span>
               
          <table width="700px" style="margin-top: 10px;">
          <tr>
          <td>          
                <div class="editor-label">
                    <%: Html.LabelFor(service => service.Item)%>
                </div>
            </td> 
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(service => service.Item)%>
                    <%: Html.ValidationMessageFor(service => service.Item)%>
                </div>
           </td> 
          </tr>
          <tr>
               <td>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Unit)%>
                </div>
                </td> 
                <td>
                <div class="editor-field">
                   <%: Html.TextBoxFor(service => service.Unit)%>
                    <%: Html.ValidationMessageFor(service => service.Unit)%>
                </div>
                </td>
  
            </tr>     
          <tr>       
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Description)%>
                </div>
            </td>
            <td>
                <div class="editor-field">
                   <div class="editor-field">
                    <%: Html.TextAreaFor(m => m.Description, 4, 10, new { style = "width: 95%; height:200px;", @class = "textarea" })%>
                    <%: Html.ValidationMessageFor(m => m.Description)%>
                </div>
                </div>
            </td>
          </tr>
             <tr>       
            <td colspan="2">
                <p>
                    <input type="submit" value="Create" />
                </p>
            </td>
          </tr>   
            </table>
    <% } %>
     <script type="text/javascript">
         $(document).ready(function () {

             $("#serviceCreate").validate({
                 rules: {
                     Item: "required" // simple rule, converted to {required:true} 

                 },
                 messages: { Item: "* Name is required" }

             });
         }); 
	  </script>
</asp:Content>
